#pragma once
#include <hge.h>
#include <stack>
#include "Room.h"
#include "cnFont\GfxFont.h"
class Environment
{
public:
	Environment();
	~Environment();
	void run();
	static Room* loadRoom(const char* name,int roomtype);
	static void pushRoom(Room* room);
	static void popRoom();
	static bool FrameFunc();
	static bool RenderFunc();
	static float GetDelta();
	static float GetKeyState(int key);
	static int GetKey();
	static HCHANNEL PlayMusic(HSTREAM music,bool loop,int volume = 100);
	static HCHANNEL Effect_PlayEx(HEFFECT effect,int valume = 100,int pan = 0,float pitch = 1.0,bool loop = false);
	static void Channel_StopAll(){m_hge->Channel_StopAll();}
	static void Channel_Pause(HCHANNEL chn){m_hge->Channel_Pause(chn);}
	static void Channel_Resume(HCHANNEL chn){m_hge->Channel_Resume(chn);}
	static GfxFont* GetFont();
	//to be done

private:
	static HGE* m_hge;
	static GfxFont* m_gfnt;
	static std::stack<Room*> m_rooms;
	#ifdef _DEBUG
		static hgeResourceManager *m_debug;
	#endif // _DEBUG
};
